package com.channel.test;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.channel.test.tblUnifiedTimeStatistics;
import com.channel.test.tblPassageTimeStatistics;

import com.channel.test.tblUnifiedTimeStatisticsDao;
import com.channel.test.tblPassageTimeStatisticsDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig tblUnifiedTimeStatisticsDaoConfig;
    private final DaoConfig tblPassageTimeStatisticsDaoConfig;

    private final tblUnifiedTimeStatisticsDao tblUnifiedTimeStatisticsDao;
    private final tblPassageTimeStatisticsDao tblPassageTimeStatisticsDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        tblUnifiedTimeStatisticsDaoConfig = daoConfigMap.get(tblUnifiedTimeStatisticsDao.class).clone();
        tblUnifiedTimeStatisticsDaoConfig.initIdentityScope(type);

        tblPassageTimeStatisticsDaoConfig = daoConfigMap.get(tblPassageTimeStatisticsDao.class).clone();
        tblPassageTimeStatisticsDaoConfig.initIdentityScope(type);

        tblUnifiedTimeStatisticsDao = new tblUnifiedTimeStatisticsDao(tblUnifiedTimeStatisticsDaoConfig, this);
        tblPassageTimeStatisticsDao = new tblPassageTimeStatisticsDao(tblPassageTimeStatisticsDaoConfig, this);

        registerDao(tblUnifiedTimeStatistics.class, tblUnifiedTimeStatisticsDao);
        registerDao(tblPassageTimeStatistics.class, tblPassageTimeStatisticsDao);
    }
    
    public void clear() {
        tblUnifiedTimeStatisticsDaoConfig.getIdentityScope().clear();
        tblPassageTimeStatisticsDaoConfig.getIdentityScope().clear();
    }

    public tblUnifiedTimeStatisticsDao getTblUnifiedTimeStatisticsDao() {
        return tblUnifiedTimeStatisticsDao;
    }

    public tblPassageTimeStatisticsDao getTblPassageTimeStatisticsDao() {
        return tblPassageTimeStatisticsDao;
    }

}
